<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>Cython API for random &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script type="text/javascript" src="../../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../../about.html" >
    <link rel="index" title="Index" href="../../genindex.html" >
    <link rel="search" title="Search" href="../../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../../index.html" >
    <link rel="up" title="Random sampling (numpy.random)" href="index.html" >
    <link rel="next" title="Extending" href="extending.html" >
    <link rel="prev" title="Performance" href="performance.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../../index.html">
      <img border=0 alt="NumPy" src="../../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="../index.html" >NumPy Reference</a></li>
          <li class="active"><a href="../routines.html" >Routines</a></li>
          <li class="active"><a href="index.html" accesskey="U">Random sampling (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.random</span></code>)</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="extending.html" title="Extending"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="performance.html" title="Performance"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Cython API for random</a></li>
<li><a class="reference internal" href="#c-api-for-random">C API for random</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="performance.html"
                        title="previous chapter">Performance</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="extending.html"
                        title="next chapter">Extending</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="cython-api-for-random">
<h1>Cython API for random<a class="headerlink" href="#cython-api-for-random" title="Permalink to this headline">¶</a></h1>
<p>Typed versions of many of the <a class="reference internal" href="generator.html#numpy.random.Generator" title="numpy.random.Generator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Generator</span></code></a> and <a class="reference internal" href="bit_generators/generated/numpy.random.BitGenerator.html#numpy.random.BitGenerator" title="numpy.random.BitGenerator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BitGenerator</span></code></a> methods as well as
the classes themselves can be accessed directly from Cython via</p>
<div class="highlight-cython notranslate"><div class="highlight"><pre><span></span><span class="k">cimport</span> <span class="nn">numpy.random</span>
</pre></div>
</div>
</div>
<div class="section" id="c-api-for-random">
<h1>C API for random<a class="headerlink" href="#c-api-for-random" title="Permalink to this headline">¶</a></h1>
<p>Access to various distributions is available via Cython or C-wrapper libraries
like CFFI. All the functions accept a <a class="reference internal" href="#c.bitgen_t" title="bitgen_t"><code class="xref c c-type docutils literal notranslate"><span class="pre">bitgen_t</span></code></a> as their first argument.</p>
<dl class="type">
<dt id="c.bitgen_t">
<code class="sig-name descname">bitgen_t</code><a class="headerlink" href="#c.bitgen_t" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#c.bitgen_t" title="bitgen_t"><code class="xref c c-type docutils literal notranslate"><span class="pre">bitgen_t</span></code></a> holds the current state of the BitGenerator and
pointers to functions that return standard C types while advancing the
state.</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="k">struct</span> <span class="nl">bitgen</span><span class="p">:</span>
    <span class="kt">void</span> <span class="o">*</span><span class="n">state</span>
    <span class="n">npy_uint64</span> <span class="p">(</span><span class="o">*</span><span class="n">next_uint64</span><span class="p">)(</span><span class="kt">void</span> <span class="o">*</span><span class="n">st</span><span class="p">)</span> <span class="n">nogil</span>
    <span class="kt">uint32_t</span> <span class="p">(</span><span class="o">*</span><span class="n">next_uint32</span><span class="p">)(</span><span class="kt">void</span> <span class="o">*</span><span class="n">st</span><span class="p">)</span> <span class="n">nogil</span>
    <span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="n">next_double</span><span class="p">)(</span><span class="kt">void</span> <span class="o">*</span><span class="n">st</span><span class="p">)</span> <span class="n">nogil</span>
    <span class="n">npy_uint64</span> <span class="p">(</span><span class="o">*</span><span class="n">next_raw</span><span class="p">)(</span><span class="kt">void</span> <span class="o">*</span><span class="n">st</span><span class="p">)</span> <span class="n">nogil</span>

<span class="n">ctypedef</span> <span class="n">bitgen</span> <span class="n">bitgen_t</span>
</pre></div>
</div>
</dd></dl>

<p>See <a class="reference internal" href="extending.html"><span class="doc">Extending</span></a> for examples of using these functions.</p>
<p>The functions are named with the following conventions:</p>
<ul class="simple">
<li><p>“standard” refers to the reference values for any parameters. For instance
“standard_uniform” means a uniform distribution on the interval <code class="docutils literal notranslate"><span class="pre">0.0</span></code> to
<code class="docutils literal notranslate"><span class="pre">1.0</span></code></p></li>
<li><p>“fill” functions will fill the provided <code class="docutils literal notranslate"><span class="pre">out</span></code> with <code class="docutils literal notranslate"><span class="pre">cnt</span></code> values.</p></li>
<li><p>The functions without “standard” in their name require additional parameters
to describe the distributions.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">zig</span></code> in the name are based on a ziggurat lookup algorithm is used instead
of calculating the <code class="docutils literal notranslate"><span class="pre">log</span></code>, which is significantly faster. The non-ziggurat
variants are used in corner cases and for legacy compatibility.</p></li>
</ul>
<dl class="function">
<dt id="c.random_standard_uniform">
double <code class="sig-name descname">random_standard_uniform</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_uniform" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_uniform_fill">
void <code class="sig-name descname">random_standard_uniform_fill</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a>*<em> bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> cnt</em>, double<em> *out</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_uniform_fill" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_exponential">
double <code class="sig-name descname">random_standard_exponential</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_exponential" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_exponential_fill">
void <code class="sig-name descname">random_standard_exponential_fill</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> cnt</em>, double<em> *out</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_exponential_fill" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_normal">
double <code class="sig-name descname">random_standard_normal</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a>*<em> bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_normal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_normal_fill">
void <code class="sig-name descname">random_standard_normal_fill</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> count</em>, double<em> *out</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_normal_fill" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_normal_fill_f">
void <code class="sig-name descname">random_standard_normal_fill_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> count</em>, float<em> *out</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_normal_fill_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_gamma">
double <code class="sig-name descname">random_standard_gamma</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> shape</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_gamma" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_uniform_f">
float <code class="sig-name descname">random_standard_uniform_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_uniform_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_uniform_fill_f">
void <code class="sig-name descname">random_standard_uniform_fill_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a>*<em> bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> cnt</em>, float<em> *out</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_uniform_fill_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_exponential_f">
float <code class="sig-name descname">random_standard_exponential_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_exponential_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_exponential_fill_f">
void <code class="sig-name descname">random_standard_exponential_fill_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> cnt</em>, float<em> *out</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_exponential_fill_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_normal_f">
float <code class="sig-name descname">random_standard_normal_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a>*<em> bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_normal_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_gamma_f">
float <code class="sig-name descname">random_standard_gamma_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, float<em> shape</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_gamma_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_normal">
double <code class="sig-name descname">random_normal</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> loc</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_normal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_gamma">
double <code class="sig-name descname">random_gamma</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> shape</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_gamma" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_gamma_f">
float <code class="sig-name descname">random_gamma_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, float<em> shape</em>, float<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_gamma_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_exponential">
double <code class="sig-name descname">random_exponential</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_exponential" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_uniform">
double <code class="sig-name descname">random_uniform</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> lower</em>, double<em> range</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_uniform" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_beta">
double <code class="sig-name descname">random_beta</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> a</em>, double<em> b</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_beta" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_chisquare">
double <code class="sig-name descname">random_chisquare</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> df</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_chisquare" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_f">
double <code class="sig-name descname">random_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> dfnum</em>, double<em> dfden</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_cauchy">
double <code class="sig-name descname">random_standard_cauchy</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_cauchy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_pareto">
double <code class="sig-name descname">random_pareto</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> a</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_pareto" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_weibull">
double <code class="sig-name descname">random_weibull</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> a</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_weibull" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_power">
double <code class="sig-name descname">random_power</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> a</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_power" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_laplace">
double <code class="sig-name descname">random_laplace</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> loc</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_laplace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_gumbel">
double <code class="sig-name descname">random_gumbel</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> loc</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_gumbel" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_logistic">
double <code class="sig-name descname">random_logistic</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> loc</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_logistic" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_lognormal">
double <code class="sig-name descname">random_lognormal</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> mean</em>, double<em> sigma</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_lognormal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_rayleigh">
double <code class="sig-name descname">random_rayleigh</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> mode</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_rayleigh" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_standard_t">
double <code class="sig-name descname">random_standard_t</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> df</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_standard_t" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_noncentral_chisquare">
double <code class="sig-name descname">random_noncentral_chisquare</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> df</em>, double<em> nonc</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_noncentral_chisquare" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_noncentral_f">
double <code class="sig-name descname">random_noncentral_f</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> dfnum</em>, double<em> dfden</em>, double<em> nonc</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_noncentral_f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_wald">
double <code class="sig-name descname">random_wald</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> mean</em>, double<em> scale</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_wald" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_vonmises">
double <code class="sig-name descname">random_vonmises</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> mu</em>, double<em> kappa</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_vonmises" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_triangular">
double <code class="sig-name descname">random_triangular</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> left</em>, double<em> mode</em>, double<em> right</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_triangular" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_poisson">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_poisson</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> lam</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_poisson" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_negative_binomial">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_negative_binomial</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> n</em>, double<em> p</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_negative_binomial" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="type">
<dt id="c.binomial_t">
<code class="sig-name descname">binomial_t</code><a class="headerlink" href="#c.binomial_t" title="Permalink to this definition">¶</a></dt>
<dd><div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="k">typedef</span> <span class="k">struct</span> <span class="n">s_binomial_t</span> <span class="p">{</span>
  <span class="kt">int</span> <span class="n">has_binomial</span><span class="p">;</span> <span class="cm">/* !=0: following parameters initialized for binomial */</span>
  <span class="kt">double</span> <span class="n">psave</span><span class="p">;</span>
  <span class="n">RAND_INT_TYPE</span> <span class="n">nsave</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">r</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">q</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">fm</span><span class="p">;</span>
  <span class="n">RAND_INT_TYPE</span> <span class="n">m</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">p1</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">xm</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">xl</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">xr</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">c</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">laml</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">lamr</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">p2</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">p3</span><span class="p">;</span>
  <span class="kt">double</span> <span class="n">p4</span><span class="p">;</span>
<span class="p">}</span> <span class="n">binomial_t</span><span class="p">;</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="c.random_binomial">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_binomial</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> p</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> n</em>, <a class="reference internal" href="#c.binomial_t" title="binomial_t">binomial_t</a><em> *binomial</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_binomial" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_logseries">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_logseries</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> p</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_logseries" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_geometric_search">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_geometric_search</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> p</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_geometric_search" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_geometric_inversion">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_geometric_inversion</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> p</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_geometric_inversion" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_geometric">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_geometric</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> p</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_geometric" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_zipf">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_zipf</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, double<em> a</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_zipf" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_hypergeometric">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_hypergeometric</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> good</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> bad</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> sample</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_hypergeometric" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_interval">
<a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a> <code class="sig-name descname">random_interval</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a><em> max</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_interval" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_multinomial">
void <code class="sig-name descname">random_multinomial</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> n</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> *mnix</em>, double<em> *pix</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_intp" title="npy_intp">npy_intp</a><em> d</em>, <a class="reference internal" href="#c.binomial_t" title="binomial_t">binomial_t</a><em> *binomial</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_multinomial" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_multivariate_hypergeometric_count">
int <code class="sig-name descname">random_multivariate_hypergeometric_count</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> total</em>, size_t<em> num_colors</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> *colors</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> nsample</em>, size_t<em> num_variates</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> *variates</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_multivariate_hypergeometric_count" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_multivariate_hypergeometric_marginals">
void <code class="sig-name descname">random_multivariate_hypergeometric_marginals</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> total</em>, size_t<em> num_colors</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> *colors</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> nsample</em>, size_t<em> num_variates</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a><em> *variates</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_multivariate_hypergeometric_marginals" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p>Generate a single integer</p>
<dl class="function">
<dt id="c.random_positive_int64">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_positive_int64</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_positive_int64" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_positive_int32">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int32" title="npy_int32">npy_int32</a> <code class="sig-name descname">random_positive_int32</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_positive_int32" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_positive_int">
<a class="reference internal" href="../c-api/dtype.html#c.npy_int64" title="npy_int64">npy_int64</a> <code class="sig-name descname">random_positive_int</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_positive_int" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="c.random_uint">
<a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a> <code class="sig-name descname">random_uint</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_uint" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p>Generate random uint64 numbers in closed interval [off, off + rng].</p>
<dl class="function">
<dt id="c.random_bounded_uint64">
<a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a> <code class="sig-name descname">random_bounded_uint64</code><span class="sig-paren">(</span><a class="reference internal" href="#c.bitgen_t" title="bitgen_t">bitgen_t</a><em> *bitgen_state</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a><em> off</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a><em> rng</em>, <a class="reference internal" href="../c-api/dtype.html#c.npy_uint64" title="npy_uint64">npy_uint64</a><em> mask</em>, bint<em> use_masked</em><span class="sig-paren">)</span><a class="headerlink" href="#c.random_bounded_uint64" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>